package com.base.po.voip;

import java.util.Date;

import com.base.comm.CommUrls;

/**
 * 广告
 * 
 * @author Administrator
 *
 */
public class Adversiments {
	private String id;// id

	private String parentid;// 代理商id

	private Integer adtype;// 广告类型 1开机图 2拨号等待图 3拨号键盘广告 4商城广告

	private String url;// 广告路径

	private Integer showcount;// 展示次数

	private Integer hitscount; // 点击次数

	private Boolean datastatus;// 数据状态

	private String path;// 图片路径

	private String bgpath;// 背景路径

	private String bgcolor;// 背景颜色

	private Date createtime;// 上传时间

	public Adversiments() {
		super();
	}

	public Adversiments(String parentid, Boolean datastatus) {
		super();
		this.parentid = parentid;
		this.datastatus = datastatus;
	}

	public Adversiments(String parentid, Boolean datastatus, Integer adtype) {
		super();
		this.parentid = parentid;
		this.datastatus = datastatus;
		this.adtype = adtype;
	}

	public Adversiments(String id, String parentid, Integer adtype, String url, Integer showcount, Integer hitscount,
			Boolean datastatus, String path, Date createtime) {
		super();
		this.id = id;
		this.parentid = parentid;
		this.adtype = adtype;
		this.url = url;
		this.showcount = showcount;
		this.hitscount = hitscount;
		this.datastatus = datastatus;
		this.path = path;
		this.createtime = createtime;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id == null ? null : id.trim();
	}

	public String getParentid() {
		return parentid;
	}

	public void setParentid(String parentid) {
		this.parentid = parentid == null ? null : parentid.trim();
	}

	public Integer getAdtype() {
		return adtype;
	}

	public void setAdtype(Integer adtype) {
		this.adtype = adtype;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url == null ? null : url.trim();
	}

	public Integer getShowcount() {
		return showcount;
	}

	public void setShowcount(Integer showcount) {
		this.showcount = showcount;
	}

	public Integer getHitscount() {
		return hitscount;
	}

	public void setHitscount(Integer hitscount) {
		this.hitscount = hitscount;
	}

	public Boolean getDatastatus() {
		return datastatus;
	}

	public void setDatastatus(Boolean datastatus) {
		this.datastatus = datastatus;
	}

	public String getPath() {
		if (path != null) {
			if (path.contains("http")) {
				this.path = path.trim();
			} else {
				this.path = CommUrls.OLD_SERVER + path.trim();
			}
		}
		return path;
	}

	public void setPath(String path) {
		this.path = path == null ? null : path.trim();
	}

	public String getBgpath() {
		return bgpath;
	}

	public void setBgpath(String bgpath) {
		this.bgpath = bgpath;
	}

	public String getBgcolor() {
		return bgcolor;
	}

	public void setBgcolor(String bgcolor) {
		this.bgcolor = bgcolor;
	}

	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}
}